package com.wedo.mall.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Lawrence on 2017/7/14.
 */

public class GoodsRecordItem implements Parcelable {

    /**
     * order_sn : 1706200000001359
     * goods_id : 3
     * goods_name : 创维（Skyworth）55M6 55英寸 4K超高清智能酷开网络液晶电视（黑色）
     * goods_image : http://img11.360buyimg.com/n1/jfs/t2689/363/2497553865/304057/8a67ed06/57693d08N9a0618c7.jpg
     * unit_price : 233.00
     * price : 1398.00
     * goods_number : 6
     * is_comment : 0
     * attr_list :
     * add_time : 1497941557
     */

    public String order_sn;
    public String goods_id;
    public String goods_name;
    public String goods_image;
    public String unit_price;
    public String price;
    public String goods_number;
    public String is_comment;
    public String attr_list;
    public String add_time;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.order_sn);
        dest.writeString(this.goods_id);
        dest.writeString(this.goods_name);
        dest.writeString(this.goods_image);
        dest.writeString(this.unit_price);
        dest.writeString(this.price);
        dest.writeString(this.goods_number);
        dest.writeString(this.is_comment);
        dest.writeString(this.attr_list);
        dest.writeString(this.add_time);
    }

    public GoodsRecordItem() {
    }

    protected GoodsRecordItem(Parcel in) {
        this.order_sn = in.readString();
        this.goods_id = in.readString();
        this.goods_name = in.readString();
        this.goods_image = in.readString();
        this.unit_price = in.readString();
        this.price = in.readString();
        this.goods_number = in.readString();
        this.is_comment = in.readString();
        this.attr_list = in.readString();
        this.add_time = in.readString();
    }

    public static final Parcelable.Creator<GoodsRecordItem> CREATOR = new Parcelable.Creator<GoodsRecordItem>() {
        @Override
        public GoodsRecordItem createFromParcel(Parcel source) {
            return new GoodsRecordItem(source);
        }

        @Override
        public GoodsRecordItem[] newArray(int size) {
            return new GoodsRecordItem[size];
        }
    };
}
